/*
 * ipc_type.h
 *
 *  Created on: 2016-11-17
 *      Author: m
 */

#ifndef SRC_INCLUDE_DRIVER_IPC_TYPE_H_
#define SRC_INCLUDE_DRIVER_IPC_TYPE_H_

#include "type.h"
#include "hd.h"

typedef struct {
    int minor;
} MT_DEV_OPEN_TYPE;

typedef struct {
    int minor;
    u32 pos;
    void* buf;
    int rw_len;
    int from_pid;
} MT_HD_RW_TYPE;

typedef struct {
    int minor;
    PART_INFO pi;
} MT_HD_IO_CTRL_TYPE;

typedef struct {
    int flags;
    int fd;
    char* path;
} MT_FS_OPEN_TYPE;

#define CPT(t, buf) ((t)buf) //convert to pointer

#endif /* SRC_INCLUDE_DRIVER_IPC_TYPE_H_ */
